<?xml version="1.0" ?>
<xs:schema id="NewDataSet" targetNamespace="http://euss.evaluant.com/schemas/EngineConfiguration.xsd"
	xmlns:mstns="http://euss.evaluant.com/schemas/EngineConfiguration.xsd" xmlns="http://euss.evaluant.com/schemas/EngineConfiguration.xsd"
	xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
	attributeFormDefault="qualified" elementFormDefault="qualified">

  <xs:simpleType name="PersistenceEngineFactoryType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Evaluant.Uss.Hub.HubProvider" />
      <xs:enumeration value="Evaluant.Uss.SqlMapper.SqlMapperProvider" />
      <xs:enumeration value="Evaluant.Uss.Sql.SqlProvider" />
      <xs:enumeration value="Evaluant.Uss.Xml.XmlProvider" />
      <xs:enumeration value="Evaluant.Uss.Memory.MemoryProvider" />
      <xs:enumeration value="Evaluant.Uss.Cache.CacheProvider" />
      <xs:enumeration value="Evaluant.Uss.Trace.TraceProvider" />
      <xs:enumeration value="Evaluant.Uss.Remoting.RemoteProvider" />
      <xs:enumeration value="Evaluant.Uss.Sync.SyncProvider" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DialectType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Evaluant.Uss.SqlMapper.MsSqlDialect" />
      <xs:enumeration value="Evaluant.Uss.SqlMapper.OracleDialect" />
      <xs:enumeration value="Evaluant.Uss.SqlMapper.MySqlDialect" />
      <xs:enumeration value="Evaluant.Uss.SqlMapper.AccessDialect" />
      <xs:enumeration value="Evaluant.Uss.SqlMapper.SQLiteDialect" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DriverType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Evaluant.Uss.SqlMapper.MsSqlDriver" />
      <xs:enumeration value="Evaluant.Uss.SqlMapper.MsOracleDriver" />
      <xs:enumeration value="Evaluant.Uss.SqlMapper.MySqlDriver" />
      <xs:enumeration value="Evaluant.Uss.SqlMapper.OleDbDriver" />
      <xs:enumeration value="Evaluant.Uss.SqlMapper.SQLiteDriver" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MappingIntTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Byte"/>
      <xs:enumeration value="Int16"/>
      <xs:enumeration value="Int32"/>
      <xs:enumeration value="Int64"/>
      <xs:enumeration value="SByte"/>
      <xs:enumeration value="UInt16"/>
      <xs:enumeration value="UInt32"/>
      <xs:enumeration value="UInt64"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MappingBoolTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Boolean"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MappingStringTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="AnsiString"/>
      <xs:enumeration value="AnsiStringFixedLength"/>
      <xs:enumeration value="String"/>
      <xs:enumeration value="StringFixedLength"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MappingFloatTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Single"/>
      <xs:enumeration value="Double"/>
      <xs:enumeration value="Decimal"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MappingDateTimeTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="DateTime"/>
      <xs:enumeration value="Date"/>
      <xs:enumeration value="Time"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MappingBinaryTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Binary"/>
      <xs:enumeration value="Object"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="DelegatorType">
    <xs:sequence>
      <xs:element name="PersistenceEngine" minOccurs="0" maxOccurs="1" type="PersistenceEngineType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DelegatorsType">
    <xs:sequence>
      <xs:element name="PersistenceEngine" minOccurs="0" maxOccurs="unbounded" type="PersistenceEngineType" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PersistenceEngineType">
    <xs:all>
      <xs:element name="Metadata" minOccurs="0" >
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="xs:string">
              <xs:attribute name="Type" use="required" form="unqualified" >
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="model" />
                    <xs:enumeration value="metadata" />
                    <xs:enumeration value="assembly" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="Delegators" type="DelegatorsType"  minOccurs="0" maxOccurs="1" />
      <xs:element name="DefaultEngineIndex" type="xs:int" minOccurs="0" maxOccurs="1" />
      <xs:element name="ConnectionString" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="MappingFileName" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="Dialect" type="DialectType" minOccurs="0" maxOccurs="1" />
      <xs:element name="Driver" type="DriverType" minOccurs="0" maxOccurs="1" />
      <xs:element name="Options" type="DriverType" minOccurs="0" maxOccurs="1" />
      <xs:element name="FileName" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Delegator" type="DelegatorType" minOccurs="0" maxOccurs="1" />
      <xs:element name="Host" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Port" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="Provider" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="MetadataProvider" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="ClientId" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="TablePrefix" type="xs:string" minOccurs="0" maxOccurs="1" />
      <xs:element name="MappingIntType" type="MappingIntTypeType" minOccurs="0" maxOccurs="1" />
      <xs:element name="MappingBoolType" type="MappingBoolTypeType" minOccurs="0" maxOccurs="1" />
      <xs:element name="MappingStringType" type="MappingStringTypeType" minOccurs="0" maxOccurs="1" />
      <xs:element name="MappingStringSize" minOccurs="0" maxOccurs="1" />
      <xs:element name="MappingFloatType" type="MappingFloatTypeType" minOccurs="0" maxOccurs="1" />
      <xs:element name="MappingDateTimeType" type="MappingDateTimeTypeType" minOccurs="0" maxOccurs="1" />
      <xs:element name="MappingBinaryType" type="MappingBinaryTypeType" minOccurs="0" maxOccurs="1" />
    </xs:all>
    <xs:attribute name="Name" form="unqualified" type="xs:string" use="required" />
    <xs:attribute name="Factory" form="unqualified" type="PersistenceEngineFactoryType" />
  </xs:complexType>

  <xs:element name="PersistenceEngines">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="PersistenceEngine" minOccurs="0" maxOccurs="unbounded" type="PersistenceEngineType" />
      </xs:sequence>
      <xs:attribute name="DefaultEngine" form="unqualified" type="xs:string" use="required" />
    </xs:complexType>
  </xs:element>
</xs:schema>